<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script type="text/javascript">
            //Call:它的第一个参数用作 this 的对象。其他参数都直接传递给函数自身。例如：
            function sayColor(sPrefix,sSuffix) {
                alert(sPrefix + this.color + sSuffix);
            };
            var obj = new Object();
            obj.color = "blue";
            sayColor.call(obj, "The color is ", "a very nice color indeed.");   //The color is blue, a very nice color indeed

            //apply() 方法有两个参数，用作 this 的对象和要传递给函数的参数的数组。例如：
            function sayColor(sPrefix,sSuffix) {
                alert(sPrefix + this.color + sSuffix);
            };
            var obj = new Object();
            obj.color = "blue";
            sayColor.apply(obj, new Array("The color is ", "a very nice color indeed."));

        </script>
    </head>
    <body>

    </body>
</html>
